<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:composite="http://java.sun.com/jsf/composite">

    <!-- INTERFACE -->
    <composite:interface>
        <composite:attribute name="styleClass" default = "menu"/>
    </composite:interface>

    <!-- IMPLEMENTATION -->
    <composite:implementation>
        <ul class = "#{cc.attrs.styleClass}">
            <li>
                <h:link  outcome = "home">Home</h:link>
            </li>
            <li>
                <h:link rendered="#{!loginJSFBean.logged}" outcome="login" >Log in</h:link>
            </li>
            <li>
                <h:link rendered="#{!loginJSFBean.logged}" outcome="register" >Register</h:link>
            </li>
            <li>
                <h:form styleClass = "inline">
                    <h:commandLink styleClass = "inline" rendered="#{loginJSFBean.logged}" action="#{loginJSFBean.logout}" >Log out</h:commandLink>
                </h:form>
            </li>
            <li>
                <h:link rendered="#{loginJSFBean.logged}" outcome="profile" >Profile</h:link>
            </li>
            <li>
                <h:link rendered="#{loginJSFBean.editor}" outcome="editor" >Editor panel</h:link>
            </li>
            <li>
                <h:link rendered="#{loginJSFBean.moderator}" outcome="moderator" >Moderator panel</h:link>
            </li>
            <li>
                <h:link rendered="#{loginJSFBean.admin}" outcome="admin" >Admin panel</h:link>
            </li>
            <li>
                <h:link  outcome = "about">About</h:link>
            </li>
        </ul>
    </composite:implementation>


</html>